package com.xh.bussiness.permission.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xh.bussiness.permission.dao.UserSubjectMapper;
import com.xh.bussiness.permission.model.UserSubject;
import com.xh.bussiness.permission.service.IUserSubjectService;
import com.xh.core.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author Pitt zhang
 * @since 2019/10/16
 */
@Service
public class UserSubjectServiceImpl extends BaseServiceImpl<UserSubjectMapper, UserSubject> implements IUserSubjectService {

    @Override
    public void deleteByUserId(String userId) {
        this.dao.deleteByUserId(userId);
    }

    @Override
    public List<UserSubject> queryUserJyGradeRange(String userId) {
        QueryWrapper qw = new QueryWrapper();
        qw.eq("user_id", userId);
        List<UserSubject> list = this.dao.selectList(qw);
        return list;
    }
}
